package com.open4cn.simulator.parser.huagao.hg9000;

import com.open4cn.simulator.core.answer.AbstractAnswer;
import com.open4cn.simulator.core.ext.HuaGaoInMessage;
import com.open4cn.simulator.core.ext.HuaGaoStatus;
import com.open4cn.simulator.core.parser.IInstructionParser;
import com.open4cn.simulator.core.parser.InstructionParserChain;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;

/**
 * @author yinxiaopeng
 * @version 1.0.0
 * @company 致景科技
 * @department 飞梭BU/研发
 * @description 复位
 * @Email yinxiaopeng@zj.tech
 * @date 2022-05-08 19:18
 */
public class RS implements IInstructionParser {
    private Logger logger = LoggerFactory.getLogger(this.getClass());

    private static final String COMMAND = "RS";

    private HuaGaoStatus huaGaoStatus;

    public RS(HuaGaoStatus huaGaoStatus) {
        this.huaGaoStatus = huaGaoStatus;
        init();
    }

    private void init() {

    }

    @Override
    public Object parse(Object msg, InstructionParserChain chain) {
        HuaGaoInMessage inMessage = (HuaGaoInMessage) msg;
        if (!COMMAND.equals(inMessage.getCommand())) {
            return chain.filter(msg);
        }

        return null;
    }

    @Override
    public List<AbstractAnswer> getAnswers() {
        return null;
    }
}
